package com.gba.mark.user.service.permission.impl;

import com.gba.mark.user.entity.permission.UserRole;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.gba.mark.user.mapper.permission.UserRoleMapper;
import com.gba.mark.user.service.permission.IUserRoleService;

import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class UserRoleServiceImpl extends ServiceImpl<UserRoleMapper, UserRole> implements IUserRoleService {

    @Resource
    private UserRoleMapper userRoleMapper;

    @Override
    public boolean save(Long userId,Long roleId){
        UserRole sysUserRole = new UserRole();
        sysUserRole.setUserId(userId);
        sysUserRole.setRoleId(roleId);
        userRoleMapper.insert(sysUserRole);
        return true;
    }

}
